﻿import request from '/@/utils/request';
enum Api {
  AddEmployee = '/api/employee/add',
  DeleteEmployee = '/api/employee/delete',
  UpdateEmployee = '/api/employee/update',
  PageEmployee = '/api/employee/page',
  DetailEmployee = '/api/employee/detail',
  GetProjectProjectIdDropdown = '/api/employee/ProjectProjectIdDropdown',
}

// 增加人员信息
export const addEmployee = (params?: any) =>
	request({
		url: Api.AddEmployee,
		method: 'post',
		data: params,
	});

// 删除人员信息
export const deleteEmployee = (params?: any) => 
	request({
			url: Api.DeleteEmployee,
			method: 'post',
			data: params,
		});

// 编辑人员信息
export const updateEmployee = (params?: any) => 
	request({
			url: Api.UpdateEmployee,
			method: 'post',
			data: params,
		});

// 分页查询人员信息
export const pageEmployee = (params?: any) => 
	request({
			url: Api.PageEmployee,
			method: 'post',
			data: params,
		});

// 详情人员信息
export const detailEmployee = (id: any) => 
	request({
			url: Api.DetailEmployee,
			method: 'get',
			data: { id },
		});

export const getProjectProjectIdDropdown = () =>
		request({
		url: Api.GetProjectProjectIdDropdown,
		method: 'get'
		});

